package com.macro.mall.common.shard;

/**
 * @author wwj
 */
public class ShardThreadLocal {

    public final String KEY_ID = "SHARD_ID";

    private static final ThreadLocal<Long> THREAD_LOCAL = new ThreadLocal<>();


    public static void put(Long id) {
        THREAD_LOCAL.set(id);
    }


    public static Long get() {
        return THREAD_LOCAL.get();
    }

}
